define(function(require) {
	// var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");

	var Model = function() {
		this.callParent();
	};

	Model.prototype.BtnClick = function(event) {
		var type = event.source.$domNode.attr('xid'); // 获取点击按钮的xid);
		console.log("Type=", type);
		if (type == "FactoryBtn") {
			window.app.LoginType = "Factory";
		}
		if (type == "SalesBtn") {
			window.app.LoginType = "Sales";
		}
		justep.Shell.showPage("Login", {
			type : type
		});
	};

	return Model;
});